<template>
  <a-space direction="vertical" style="width: 100%">
    <a-alert message="最大井斜提示" :description="riskTip" type="warning" show-icon />
  </a-space>
</template>
<script setup>
import { queryOne } from "@/api/salvage/case.js"
const props = defineProps({
  solutionDetail: {
    type: Object,
  },
});
const riskTip = ref()
function getRiskCase() {
  // if (props.solutionDetail.caseList) {
    
  // }
  // queryOne().then(res => {

  // })
  latestSurvey(localStorage.getItem("salvageWellId")).then(res => {
    // console.log('最新测井记录', res);
    queryOne(res.id).then(response => {
      // console.log('井眼轨迹', response);
      const maxObject = response.reduce((maxObj, obj) => {
        return obj.inclination > maxObj.inclination ? obj : maxObj;
      }, response[0]);
      console.log('最大井斜对象', maxObject);
      riskTip.value = `当井深为${maxObject.depth}m时，井斜角达到最大，为${maxObject.inclination}`
    })
  })
}
getLastSurvey()
</script>
